<?php
class Sjpj_ctl extends Ctl{
    function __construct(){
    }
    function main(array $xxfget) {
		$type=!empty($_POST['type'])?$_POST['type']:false;
		if(!$type){
			//unset($_SESSION['sid']);
			//$this::show('sjpj_login');
			//上面是老评教系统
			$this->show("pingcelogin");
		}elseif($type=="login"){
			$idcard=$_POST['idcard'];
			$sid=xdb::getInstance()->getvar("select id from stu where idcard like '".$idcard."'");
			if($sid){
				$_SESSION["sid"]=$sid;
				echo 1;
			}else{
				echo 0;
			}
		}    
    }
}